<?php 
namespace Admin\Model;
use Think\Model;

class ProductModel extends Model {

	protected $_validate = array(
		array('name','require','请填写商品名称！'),
		// array('name','','商品名称在3个字到50个字之间！',1,'length','3,30'),
		array('sku','require','请填写商品货号！'), 
	);

	protected $_auto = array(
		array('add_time','getDateTime',self::MODEL_INSERT,'callback'),
		);

    public function getDateTime(){
        return date('Y-m-d H:i:s');
    }
}